package com.osce.common.utils.oesc;

import cn.hutool.core.date.DateUtil;
import com.doudou.core.container.SetUtil;

import java.util.Date;
import java.util.Set;

/**
 * @author zzxjs
 * @since 2023/9/8
 */
public class PeopleStatus {

    /**
     * 是否在等待
     */
    private Boolean wait = false;

    /**
     * 考过的时间
     */
    private Set<String> exTimeSet = SetUtil.hashSet();



    public Boolean getWait() {
        return wait;
    }

    public void setWait(Boolean wait) {
        this.wait = wait;
    }

    public Set<String> getExTimeSet() {
        return exTimeSet;
    }

    public void setExTimeSet(Set<String> exTimeSet) {
        this.exTimeSet = exTimeSet;
    }

    public PeopleStatus wait(Boolean wait) {
        this.wait = wait;
        return this;
    }

    public PeopleStatus exTimeSet(Set<String> exTimeSet) {
        this.exTimeSet = exTimeSet;
        return this;
    }

    public PeopleStatus addTimeSet(Date time){
        this.exTimeSet.add(DateUtil.formatTime(time));
        return this;
    }

    public boolean containsTime(Date time){
        return this.exTimeSet.contains(DateUtil.formatTime(time));
    }

}
